package cn.xorange.commons.utils.configuration.constants;

/**
 * @author : yangjian
 * @date : 2023/11/23
 */
public enum UtilsErrorCode {

    SUCCESS(HttpStatus.SUCCESS,0,"请求成功"),
    CACHE_NULL(HttpStatus.ERROR, 1901,"缓存中没有定义"),
    CACHE_KEY_NULL(HttpStatus.ERROR, 1902,"缓存查询的key不能为空"),

    CAPTCHA_CREATE_ERROR(HttpStatus.ERROR, 5001, "验证码创建错误"),
    CAPTCHA_UUID_NULL(HttpStatus.ERROR,5002,"验证码UUID为空"),
    CAPTCHA_PARAM_ERROR(HttpStatus.ERROR,5003,"验证码缺少参数"),
    CAPTCHA_CODE_NULL(HttpStatus.ERROR,5006,"验证码为空"),
    CAPTCHA_NO_MATCH(HttpStatus.SUCCESS,5003,"验证码错误"),
    CAPTCHA_EXPIRE(HttpStatus.SUCCESS,5005,"验证码过期"),

    SYSTEM_EXCEPTION(HttpStatus.ERROR,9001,"系统错误");

    UtilsErrorCode(int status, int code, String msg){
        this.status = status;
        this.code = code;
        this.msg = msg;
    }

    private int status;
    private int code;
    private String msg;
    public int getStatus(){ return status; }
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg){
        this.msg = msg;
    }
}
